package com.java.demo10;


public class Test {
    public static void main(String[] args) {
//        Animal animal = new CatImpl();
//        animal.eat();
        //接口中定义的成员变量都为常量(默认）
        Animal dog = new DogImpl();
        System.out.println(dog.code1);
        System.out.println(dog.code2);
        System.out.println(dog.code3);

        System.out.println("------------------");

        System.out.println(Animal.code1);
        System.out.println(Animal.code2);
        System.out.println(Animal.code3);


        System.out.println("--------------");
        //接口中的方法默认都是抽象方法
        dog.sleep();

    }
}
